<script setup>
import { ref } from 'vue'
import { getArticleCateListService } from '@/api/article'

const channelList = ref([])
defineProps({
  width: {
    type: String
  }
})
const model = defineModel()
const getChannelList = async () => {
  const res = await getArticleCateListService()
  channelList.value = res.data.data
  console.log(channelList.value)
}
getChannelList()
</script>
<template>
  <el-select v-model="model" :style="{ width }">
    <el-option
      v-for="channel in channelList"
      :key="channel.id"
      :label="channel.cate_name"
      :value="channel.id"
    ></el-option>
  </el-select>
</template>
